#include "ConfigSingleton.h"

namespace lib3dw
{
	ConfigSingleton* ConfigSingleton::instance = 0;

	ConfigSingleton::ConfigSingleton()
	{
		renderMode = RenderVBO;
		showFPS = true;
		frustumCulling = false;
		wireframe = false;
	}

	ConfigSingleton* ConfigSingleton::Instance()
	{
		if( instance == 0 )
		{
			instance = new ConfigSingleton();
		}
		return instance;
	}

	const bool ConfigSingleton::GetWireframe() const
	{
		return wireframe;
	}
	
	const void ConfigSingleton::SetWireframe(bool newWireframe)
	{
		wireframe = newWireframe;
	}

	const RenderMode ConfigSingleton::GetRenderMode() const
	{
		return renderMode;
	}
	
	const void ConfigSingleton::SetRenderMode(RenderMode mode)
	{
		std::cout << "changed RenderMode to: " << mode << "\n";
		renderMode = mode;
	}
	
	const bool ConfigSingleton::GetShowFPS() const
	{
		return showFPS;
	}
	
	const void ConfigSingleton::SetShowFPS(bool fps)
	{
		showFPS = fps;
	}
	
	const bool ConfigSingleton::GetFrustumCulling() const
	{
		return frustumCulling;
	}
	
	const void ConfigSingleton::SetFrustumCulling(bool newFrustumCulling)
	{
		frustumCulling = newFrustumCulling;
	}
}